<template>
	<skeleton :skeleton="{name:'exam'}"
			  :showSkeleton="showSkeleton">
		<block slot="content">
			<view class="container">
				<view class="swiper">
					<view class="title">
						快速练习
					</view>
					<view class="lab">
						（共20道题）
					</view>
					<view class="content">系统随机抽取各知识点试题，错题率较高的知识点试题数量适量增加，以提升你的综合能力</view>
				</view>
				<button class="start-btn" @click="startExam">开始答题</button>
			</view>
		</block>
	</skeleton>
</template>

<script>
	import navbarExam from '@/mixins/common/navbar/exam';

	export default {
		mixins: [navbarExam],
		data() {
			return {
				examType: '1',//试卷类型
				paperInfo: undefined,
                showSkeleton:false,
				ascription:undefined,
				examBarData: [{
					img: '/static/exam/examBar06.png',
					text: '',
					id: 'findError',
					type: 'static',
					onPress: (context) => {
						uni.navigateTo({
							url: "/pages/exam/history?ascription="+this.ascription
								+"&examType=3&resultType=1"
						});
					}
				}]
			}
		},
		onLoad(query) {
			this.examType = query.paperType;
			this.ascription = query.ascription;
		},
		methods: {
			//开始答题
			startExam() {
				uni.redirectTo({
					url: '/pages/exam/examsub?examType='+this.examType+'&ascription='+this.ascription+'&amount=20'
				})
			},
		},
	}
</script>

<style lang='scss' scoped>
	.container {
		height: 100%;
		background: #fff;
	}

	.swiper {
		width: 100%;
		text-align: center;
		padding: 300upx 96upx 0;
	}

	.title {
		font-size: 30upx;
		color: #333;
		font-weight: bold;
	}

	.lab {
		font-size: 24upx;
		color: #999;
		margin: 20upx 0 40upx;
	}

	.content {
		font-size: 28upx;
		color: #666666;
	}

	.start-btn {
		position: fixed;
		bottom: 160upx;
		left: 0;
		right: 0;
		width: 610upx;
		height: 80upx;
		background-color: #5ea1f8;
		border-radius: 8upx;
		color: #fff;
		font-size: 28upx;
	}
</style>

<style lang='scss'>
	page {
		height: 100%;
	}
</style>
